package org.idea.spring.framework.event.multiEvent;

import org.idea.spring.framework.event.multiEvent.service.EventTestService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 *
 *
 * @Author linhao
 * @Date created in 3:13 下午 2021/5/30
 */
@SpringBootApplication
public class SpringApplicaitonDemo implements CommandLineRunner {

    @Resource
    private EventTestService eventTestService;

    public static void main(String[] args) {
        SpringApplication.run(SpringApplicaitonDemo.class);
    }

    @Override
    public void run(String... args) throws Exception {
        Thread.sleep(1000);
        eventTestService.doSendMsg();
    }
}
